package cn.com.dycc.common.push_key.dao;

import org.springframework.stereotype.Repository;

import cn.com.dycc.common.push_key.entity.UserChannel;

@Repository("userChannelDao")
public interface UserChannelDao {
	
	/**
	 * 通过user_id查询channelid
	 * @param user_id
	 * @return
	 */
	public String findChannelIdByUserId(String user_id);
	
	/**
	 * 用户登录时，将用户id和channelid绑定
	 * @param userChannel
	 * @return
	 */
	public int insertChannel(UserChannel userChannel);
	
	/**
	 * 用户重新登录更新channelid
	 * @param userChannel
	 * @return
	 */
	public int updateChannelByUserId(UserChannel userChannel);
	
	/**
	 * 根据id查询设备标识码
	 * @param user_id
	 * @return
	 */
	public Integer findeviceType(String user_id);
}
